<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<portlet:defineObjects/>

<fmt:setBundle basename="resources.add" scope="request"/>    

<jsp:include page="/WEB-INF/jsp/css.jsp"/>
<%@ include file="processActionException.jsp" %>
        
<%@ include file="setBeans.jsp" %>    

<c:if test="${renderException == null}">    
    <portlet:actionURL var="action"/>
    <form name="addForm" action="<%=action%>" method="post" enctype="multipart/form-data">
        <p><fmt:message key="addPhotos"/></p>        
        <table>
            <tbody>
                <c:forEach var="i" begin="1" end="4">
                    <tr>
                        <c:forEach var="j" begin="1" end="2">
                            <td>
                                <fmt:message key="photo"/>
                            </td>
                            <td>
                                <input type="file" name="photo<c:out value="${i}.${j}"/>"/>
                                   </td>
                        </c:forEach>
                    </tr>
                    <tr>
                        <c:forEach var="j" begin="1" end="2">
                            <td>
                                <fmt:message key="title"/>
                            </td>
                            <td>
                                <input type="text" name="photo<c:out value="${i}.${j}"/>_title"/>
                                   </td>
                        </c:forEach>
                    </tr>
                    <tr><td>&nbsp;</td></tr>
                </c:forEach>
            </tbody>
        </table>
        <table>
            <tr>
                <td>
                    <input type="submit" name="submit" value="<fmt:message key="add"/>"/>
                </td>
                <td>
                    <input type="submit" name="cancel" value="<fmt:message key="cancel"/>"/>
                </td>
            </tr>
        </table>        
    </form>
</c:if>
